
##生成动态库
#libmystd.so:mystdio.o mystring.o
#	gcc -o $@ $^ -shared
##依赖文件列表，依次形成同名的.o
#%.o:%.c
#	gcc -fPIC -c $<
#.PHONY:clean
#clean:
#	rm -rf *.so *.o
#
#.PHONY:output
#output:
#	mkdir -p mystdc/include
#	mkdir -p mystdc/lib  
#	cp -f *.h mystdc/include
#	cp -f *.so mystdc/lib 




#生成静态库
libmystd.a:mystdio.o mystring.o
	ar -rc $@ $^
#依赖文件列表，依次形成同名的.o
%.o:%.c
	gcc -c $<
.PHONY:clean
clean:
	rm -f *.a *.o

.PHONY:output
output:
	mkdir -p mystdc/include
	mkdir -p mystdc/lib  
	cp -f *.h mystdc/include
	cp -f *.a mystdc/lib 


